home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Topik / Topik - Disk 14 - Useful Commands (19xx)(Topik Public Domain)(PD)[WB].zip / Topik - Disk 14 - Useful Commands (19xx)(Topik Public Domain)(PD)[WB].adf / image_tools / filter.readme < prev    next >
Text File  |  1989-08-07  |  4KB  |  115 lines

  1.                           FILTER  1.00
  2.                           JUNE 6, 1987
  3.  
  4.                       By Stephen Vermeulen
  5.                          3635 Utah Dr. N.W.,
  6.                          Calgary, Alberta,
  7.                          CANADA, T2N 4A6
  8.  
  9.           Copyright (C) 1987 By Stephen Vermeulen
  10.           This version may be freely redistributed
  11.           so long as not charge is made for such
  12.           distribution.
  13.  
  14. ---------------------------------------------------------------------
  15.  
  16. 0.0 Introduction
  17.  
  18. Filter is a program that allows you to perform several types of image
  19. processing on your Amiga.  Filter reads and writes standard IFF ILBM
  20. type image files, so it is compatible with all your other Amiga
  21. software.  There are various things you can use Filter to do, including
  22. smoothing and softening, edge detection, and sharpening of the image.
  23. A good place to look for information on what Filter can be used to do
  24. is the March 1987 BYTE magazine in the Image Processing theme section.
  25.  
  26. 1.0 Running Filter
  27.  
  28. Filter can only be run from the CLI (this will probably be fixed soon).
  29. There are two ways of invoking it.  First just typing:
  30.  
  31.    filter
  32.  
  33. will result in the copyright notice, short instructions, and the version
  34. number being printed.  By typing a command of the following format:
  35.  
  36.    filter input.pic output.pic kernel
  37.  
  38. Filter will start to process the picture in the file "input.pic" with the
  39. image processing kernel stored in the file named kernel.  When the work
  40. has been done the result will be written to the file "output.pic".
  41. Filter takes quite a while to run, anywhere from 2 minutes to 6 minutes
  42. (or more), so you might want to run this in the background.
  43.  
  44. 2.0 Memory Usage
  45.  
  46. Filter needs to allocate 2 complete picture buffers, so if you have a 512K
  47. machine you might find it difficult to filter HiRes 16 colour pictures.
  48. Filter works REAL NICE on a 2.5Meg Amiga!
  49.  
  50. 3.0 The Kernel File
  51.  
  52. The kernel file that Filter uses is a simple ascii text file you can
  53. easily cook up with any editor.  It has the following format:
  54.  
  55.    nrows ncols normalizer
  56.    [                ]
  57.    [  kernel matrix ]
  58.    [                ]
  59.  
  60. for example a kernel file to smooth a picture might be:
  61.  
  62.    3 3 16
  63.    1 2 1
  64.    2 4 2
  65.    1 2 1
  66.  
  67. or a kernel that does a straight copy would be:
  68.  
  69.    1 1 1
  70.    1
  71.  
  72. or a kernel that does vertical edge detection might be:
  73.  
  74.    5 3 1
  75.    -1 0 1
  76.    -1 0 1
  77.    -1 0 1
  78.    -1 0 1
  79.    -1 0 1
  80.  
  81. Anyway, all the numbers in the kernel file must be integers (no decimals
  82. are allowed).  The individual numbers are defined in the following:
  83.  
  84.    nrows:      This number states how many rows the kernel matrix has.
  85.    ncols:      This number states how many columns the kernel matrix has.
  86.                Remember, the greater the number of rows or columns the
  87.                slower the process!  Also values for nrows and ncols must
  88.                always be odd (1, 3, 5,...), but do not have to be equal.
  89.  
  90.    normalizer: This number is used to scale the resulting colour values
  91.                for each pixel after the kernel matrix has been applied.
  92.                The scaling process is a simple division of the colour
  93.                components (r, g, b) by the value of the normalizer.  A
  94.                good choice for the value of the normalizer is the sum
  95.                of all the elements of the kernel matrix.  Note: the
  96.                normalizer should be greater than 0 always!
  97.  
  98.    kernel      This section of the file contains the actual image
  99.    matrix:     transformation kernel matrix.  This is basically a set
  100.                weighting factors that are applied to the pixel under
  101.                transformation, and those surrounding it to form a
  102.                weighted sum of the colour values.  The kernel matrix
  103.                always has odd dimensions, and the pixel being transformed
  104.                is the one in the centre of the matrix.
  105.  
  106. 4.0 Support
  107.  
  108. Any comments, suggestions, or bug reports you might care to make will be
  109. gratefully received.  If you are interested in seeing this program improve
  110. much send a contribution ($10-$20 to me at the address above).  My current
  111. policy on improving the program is to release a new version for every 5
  112. contributions I receive, or when I need a new feature!
  113.  
  114.  
  115.